{% set clazz = "order" %}
{% set title = "兑换详情 " + order.goodsType|integralGoodsType %}
{% extends './modules/common/templates/main.html' %}
{% block style %}
  <link rel="stylesheet" type="text/css" href="{{ '/static/css/integral.css'|version }}" />
{% endblock %}
{% block content %}
  <div class="order">
    {% if !nested %}
      <header class="bar bar-header">
        {{ macro.back() }}
        <h1 class="title">{{ title }}</h1>
      </header>
    {% endif %}
    <section>
      <div class="list">
        <div class="item-divider">商品信息</div>
        <a class="item">
          <div class="avatar">
            <img class="round" src="{{ order.coverImg|thumb(80, 80) }}" ui-mode="80px">
          </div>
          <span class="text">
            {{ order.goodsName }}
            <div class="brief"><span class="text-orange">{{ order.consumeIntegral }}积分</span></div>
          </span>
        </a>
      </div>
      <div class="list">
        <div class="item-divider">订单信息</div>
        <div class="item">
          兑换状态：<span class="text-orange">已兑换</span>
        </div>
        <div class="item">
          订单编号：{{ order.orderCode }}
        </div>
        <div class="item">
          兑换时间：{{ order.exchangeAt|date('Y-m-d H:i:s') }}
        </div>
        {% if order.goodsType === 'FLOW' %}
          <div class="item">
            充值手机：{{ order.consigneeMobile }}
          </div>
          {% elif order.goodsType === 'ENTITY' %}
          <div class="item">
            联系方式：{{ order.consignee }} {{ order.consigneeMobile }}
          </div>
          <div class="item">
            收货地址：{{ order.consigneeAddress }}
          </div>
        {% endif %}
        {% if order.ticketCode %}
          <div class="item">
            券　　号：{{ order.ticketCode }}
          </div>
        {% endif %}
      </div>
      {% if order.goodsType === 'TICKET' %}
        <div class="vspace hspace" ui-mode="30px">
          <div class="text text-sm text-center text-orange"><i class="icon">&#xe601;</i> 请在 我的-千丁券 中查看</span>
        </div>
      {% endif %}
      <div class="vspace" ui-mode="30px">
        <div class="text-sm text-gray text-center">
          <p><a class="center-block text-gray" href="/integral/instruction">兑换说明</a></p>
          <p>如有疑问，请致电：<a class="text-blue" href="tel:4000818181">4000818181</a></p>
        </div>
      </div>
    </section>
  </div>
{% endblock %}
{% block script %}
  {% parent %}
  <script src="{{ '/static/js/integral.js'|version }}"></script>
{% endblock %}